import { http, toast} from '@/uni_modules/uview-plus'

export const getGiftList = (params, config = {custom:{loading:true,catch:true}}) => http.post('/api/getGiftListApi', params, config)

export const subjectGiftInfo = (params, config = {custom:{loading:true,catch:true}}) => http.get('/api/subjectGiftInfoApi',{...config,...params})

export const joinGift = (params, config = {custom:{loading:false,catch:true,toast:false}}) => http.post('/api/joinGiftApi', params, config)

//获取送别人订单列表
export const orderForOtherGiftListApi = (params, config = {custom:{loading:false,catch:true,toast:false}}) => http.post('/api/orderForOtherGiftListApi', params, config)

export const subjectGiftLabelApi=(params={}, config = {custom:{loading:true,catch:true}}) => http.get('/api/subjectGiftLabelApi',{...config,...params})

export const subjectGiftInfoApi=(id, config = {custom:{loading:true,catch:true}}) => http.get('/api/subjectGiftInfoApi?id='+id,config)

//谜礼内容发布
export const saveGiftApi = (params, config = {custom:{loading:true,catch:true}}) => http.post('/api/saveGiftApi', params, config)

//获取送别人订单详情
export const orderForOtherInfoApi = (params, config = {custom:{loading:true,catch:true}}) => http.post('/api/orderForOtherInfoApi', params, config)

//获取送别人订单破解人&参与人列表
export const joinGiftUserListApi = (params, config = {custom:{loading:true,catch:true}}) => http.post('/api/joinGiftUserListApi', params, config)

//获取我的答题记录
export const orderForMyLogGiftListApi = (params, config = {custom:{loading:true,catch:true}}) => http.post('/api/orderForMyLogGiftListApi', params, config)

//填写物流信息领取礼物
export const orderForMyLogGiftCheckApi = (params, config = {custom:{loading:true,catch:true}}) => http.post('/api/orderForMyLogGiftCheckApi', params, config)

//审核谜礼内容答题
export const orderForOtherLogGiftCheckApi = (params, config = {custom:{loading:true,catch:true}}) => http.post('/api/orderForOtherLogGiftCheckApi', params, config)
